{volist name="list" id="vo"}
    <li>
        <p class="p1">{:check_username($vo['username'])}</p>
        <p class="p2 xingNum" data-index="{$vo.psoce}">
            <img src="/map/images/xing.png" alt=""/>
            <img src="/map/images/xing.png" alt=""/>
            <img src="/map/images/xing.png" alt=""/>
            <img src="/map/images/xing.png" alt=""/>
            <img src="/map/images/xing.png" alt=""/>
        </p>
        <p class="p3">
            {$vo.content}
        </p>
    </li>
    {/volist}


<script>
    $('.xingNum').each(function(){
        let that = $(this)
        let index = that.attr('data-index')
        let img = that.find('img')
        let xing='/map/images/xing.png'
        let xing_x='/map/images/xing_x.png'
        img.each(function(i){
            if(i<index){
                $(this).attr('src',xing_x)
            }else{
                $(this).attr('src',xing)
            }
        })
    })
</script>